//
//  OSCPageViewModel.m
//  OSChina
//
//  Created by 8b410-2 on 17/1/2.
//  Copyright © 2017年 abb. All rights reserved.
//

#import "OSCPageViewModel.h"
#import "OSCRouter.h"
@implementation OSCPageViewModel
- (instancetype)initWithServices:(id<OSCViewModelServices>)services params:(NSDictionary *)params {
    self = [super initWithServices:services params:params];
    if (self) {
        
        self.viewModels = params[@"ViewModels"];
        self.titles = params[@"Titles"];
        OSCRouter *router = [OSCRouter sharedInstance];
        NSMutableArray *controllersArr = [NSMutableArray new];
        for (OSCBaseViewModel *viewModel in self.viewModels) {
            [controllersArr addObject:[router viewControllerForViewModel:viewModel]];
        }
    }
    return self;
}
@end
